import dayjs from "dayjs";
/**
 *
 * @param {*时间} date
 * @param {*相差天数} diff
 * @returns
 */
export function formateMonthDay(date, diff = 0) {
  const newDate = diff ? getDay(date, diff) : date
  return dayjs(newDate).format('MM月DD日');
}
export function getDay(date = new Date(), diff) {
  return date.getTime() + diff * 24 * 60 * 60 * 1000
}

export function getDiffDay(start, end) {
  // console.log(dayjs(end), dayjs(start))
  return dayjs(end).diff(dayjs(start), "day")
}
